package com.hunttown.mes.rpc.domain;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * created by wangjunfu on 2019-05-18 20:14:31
 */
public class TransportSmsTemplateDTO implements Serializable {
    private Integer id;
    private Integer entId;
    private Integer templateType;
    private String discernCode;
    private String smsTopic;
    private Integer smsType;
    private String smsSign;
    private String smsTemplate;
    private String remark;
    private Integer adminId;
    private Date createTime;
    private Integer stopFlag;
    private Integer deleteFlag;

    private String smsTypeName;
    private String createTimeSr;

    //以下内容由Alt+Ins快捷生成

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getEntId() {
        return entId;
    }

    public void setEntId(Integer entId) {
        this.entId = entId;
    }

    public Integer getTemplateType() {
        return templateType;
    }

    public void setTemplateType(Integer templateType) {
        this.templateType = templateType;
    }

    public String getDiscernCode() {
        return discernCode;
    }

    public void setDiscernCode(String discernCode) {
        this.discernCode = discernCode;
    }

    public String getSmsTopic() {
        return smsTopic;
    }

    public void setSmsTopic(String smsTopic) {
        this.smsTopic = smsTopic;
    }

    public Integer getSmsType() {
        return smsType;
    }

    public void setSmsType(Integer smsType) {
        this.smsType = smsType;
    }

    public String getSmsSign() {
        return smsSign;
    }

    public void setSmsSign(String smsSign) {
        this.smsSign = smsSign;
    }

    public String getSmsTemplate() {
        return smsTemplate;
    }

    public void setSmsTemplate(String smsTemplate) {
        this.smsTemplate = smsTemplate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStopFlag() {
        return stopFlag;
    }

    public void setStopFlag(Integer stopFlag) {
        this.stopFlag = stopFlag;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public String getSmsTypeName() {
        return smsTypeName;
    }

    public void setSmsTypeName(String smsTypeName) {
        this.smsTypeName = smsTypeName;
    }

    public String getCreateTimeSr() {
        if (createTimeSr == null || createTimeSr.equals("")) {
            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");

            if (createTime == null) {
                return "1990-01-01";
            } else {
                return df.format(new Date(createTime.getTime()));
            }
        } else {
            return createTimeSr;
        }
    }

    public void setCreateTimeSr(String createTimeSr) {
        this.createTimeSr = createTimeSr;
    }
}